import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import Home from './home';
import User from './user';

ReactDOM.render(<div>
    <Home></Home>
    <User></User>
</div>, window.root)

if (module.hot) {
    module.hot.accept(() => {
        console.log(module.hot);
        let Home = require('./home').default
        let User = require('./user').default
        ReactDOM.render(<div>
            <Home></Home>
            <User></User>
        </div>, window.root)
    })
}